<template>
	<div class="user">
		<Banner></Banner>
		<Menus></Menus>
		<Mywallet></Mywallet>
		<Myserver></Myserver>
		<Selected :list='SelectedData'></Selected>
		<BottomNav topage=3></BottomNav>
	</div>
</template>

<script>
// 引入公共子组件——底部
import BottomNav from '../default/BottomNav';
import Banner from './pages/Banner';
// 订单菜单
import Menus from './pages/Menus';
// 我的钱包
import Mywallet from './pages/Mywallet';
// 我的服务
import Myserver from './pages/Myserver';
// 精选推荐
import Selected from './pages/Selected';
//加载中弹窗
import Loading from '../default/Loading';
export default{
	name:'User',
	components:{
		Banner,
		Menus,
		Mywallet,
		Myserver,
		Selected,
		BottomNav
	},
	data(){
		return {
			SelectedData:[],
		}
	},
	created() {
		this.getSelected();
	},
	methods:{
		getSelected(){
			this.$store.commit('sload');
			let url = 'https://m.youxiake.com/api/m/product/lines/recommend/user';
			this.axios.get(url).then((res)=>{
				if(res.status==200){
					//获取精选数据
					this.SelectedData = res.data.data.products;
				}
				this.$store.commit('hload');
			})
		}
	}
}
</script>

<style scoped>
.user{
	background-color: #f5f5f5;
}
</style>
